This application is based upon and claims benefit of priority from the prior Japanese Patent Applications No. 2000-333498, filed on Oct. 31, 2000; the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a data processing method, a computer readable recording medium, and a data processing device. More specifically, the present invention relates to a data processing method, a computer readable recording medium, and a data processing device, with which it is possible to efficiently store and retrieve data in a storage area of a computer, etc., or used in various application systems executable via computer etc.
2. Related Background Art
Conventionally, the sorting and storing of a plurality of data records has been performed for the purpose of retrieval. When a data record is retrieved, the value (a number, a character string, etc.) of a specific field of the data record is used as a sort key. If such specific fields of two or more records have the same value but the specific fields should represent different items of information, as in the case of representing human names, it is common to add an extra key to each record to differentiate the information items.
However, this method requires additional storage area for storing records. Moreover, this method requires a data user or a data collector to do extra tasks, i.e., to give an extra key to each data record for securing the distinctiveness of each data record.
There is another method, in which a data record does not store a field value, but stores a pointer for making access to a storage area where the corresponding field value is stored. In this way, a plurality of records can share a field value. The term xe2x80x9cpointerxe2x80x9d in this case indicates not only an address of a storage area, but also various information items which are used for determining a suitable storage area to be accessed, including, e.g., representation of information for calculating the location of the storage area.
However, this method is used only for obtaining an effect of economizing the storage area by substituting the pointer for the field value used for a plurality of records. Therefore, this method has not been used for solving the above-described problem. That is, in a data processing system using only specific field values as sort keys, this method has been only one way of representing (implementing) field values, and has had no influence on the sorting functions.
Given the above-described problems, the object of the present invention is to provide a data processing method, a computer readable recording medium, and a data processing device with which data items including overlapping portions can be compactly stored, and surely and easily retrieved.
In order to the above-described objective, according to one aspect of embodiments of the present invention, a data processing method comprises: storing a plurality of records each having a plurality of fields in a first storage area; storing a field value in a second storage area; storing a pointer to the second storage area storing the field value in at least one of the fields; and sorting the records by using at least one of the pointer to determine sorting order among the records.
The field value stored in the second storage area indicated by the pointer may be compared immediately before the pointer in determining sorting order among the records.
A retrieval operation may be performed on the sorted records by using the pointer to the second storage area storing the field value as one of searching keys.
The retrieval operation may be any efficient retrieval operation, such as a binary search, performed on the sorted records.
According to another aspect of embodiments of the present invention, in a computer readable recording medium storing a program code for managing data items, the program comprises: program code configured to store a plurality of records each having a plurality of fields in a first storage area; program code configured to store a field value in a second storage area; program code configured to store a pointer to the second storage area storing the field value in at least one of the fields; and program code configured to sort the records by using at least one of the pointer to determine sorting order among the records.
According to a further aspect of embodiments of the present invention, a data processing device comprises: a data input section configured to input a field value; a data storing section; and a data processing control section configured to control storing a plurality of records each having a plurality of fields in a first storage area of the data storing section; storing a field value in a second storage area of the data storing section; storing a pointer to the second storage area storing the field value in at least one of the fields; and sorting the records by using at least one of the pointer to determine sorting order among the records.
Embodiments of the present invention also include various kinds of software capable of executing the above-described data processing method. Further, the present invention includes various applications using the above-described data processing method.
The term xe2x80x9crecording mediumxe2x80x9d is not limited to, e.g., hard disk (HD), DVD-RAM, DVD-ROM, flexible disk (FD), and CD-ROM, but includes memory devices such as RAM, ROM, etc.
Moreover, the program to be recorded on the above-mentioned media can be encrypted, modified, or compressed to be distributed through a wired line or a wireless line, such as Intranet, Internet, etc. Alternatively, such an encrypted, modified, or compressed program can be stored in a recording medium to be distributed.